import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Fan {

	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(new File("a.txt"));

		int literatureInt = 0;
		int angrybirdInt = 0;
		int narutoInt = 0;
		int microblogInt = 0;
		int supergirlInt = 0;
		float a = 0, b = 0, c = 0, d = 0, e = 0, A = 0, B = 0, C = 0, D = 0, E = 0, V = 0, W = 0, X = 0, Y = 0, Z = 0;
		float n = 0;

		while (in.hasNext()) {
			n = n + 1;
			String line = in.nextLine();
			char literature = line.charAt(0);
			char angrybird = line.charAt(2);
			char naruto = line.charAt(4);
			char microblog = line.charAt(6);
			char supergirl = line.charAt(8);

			literatureInt = literatureInt + Integer.parseInt(literature + "");
			angrybirdInt = angrybirdInt + Integer.parseInt(angrybird + "");
			narutoInt = narutoInt + Integer.parseInt(naruto + "");
			microblogInt = microblogInt + Integer.parseInt(microblog + "");
			supergirlInt = supergirlInt + Integer.parseInt(supergirl + "");

			a = a + (Integer.parseInt(literature + ""))
					* (Integer.parseInt(literature + ""));
			b = b + (Integer.parseInt(angrybird + ""))
					* (Integer.parseInt(angrybird + ""));
			c = c + (Integer.parseInt(naruto + ""))
					* (Integer.parseInt(naruto + ""));
			d = d + (Integer.parseInt(microblog + ""))
					* (Integer.parseInt(microblog + ""));
			e = e + (Integer.parseInt(supergirl + ""))
					* (Integer.parseInt(supergirl + ""));

			A = (literatureInt / n) * (literatureInt / n) * n;
			B = (angrybirdInt / n) * (angrybirdInt / n) * n;
			C = (narutoInt / n) * (narutoInt / n) * n;
			D = (microblogInt / n) * (microblogInt / n) * n;
			E = (supergirlInt / n) * (supergirlInt / n) * n;

			V = (a - A) / n;
			W = (b - B) / n;
			X = (c - C) / n;
			Y = (d - D) / n;
			Z = (e - E) / n;

		}
		System.out.println("Total score:");
		System.out.println("literature" + literatureInt);
		System.out.println("angrybird" + angrybirdInt);
		System.out.println("naruto" + narutoInt);
		System.out.println("microblog" + microblogInt);
		System.out.println("supergirl" + supergirlInt);
		System.out.println("===============");
		System.out.println("Average score:");
		System.out.println("literature" + literatureInt / n);
		System.out.println("angrybird" + angrybirdInt / n);
		System.out.println("naruto" + narutoInt / n);
		System.out.println("microblog" + microblogInt / n);
		System.out.println("supergirl" + supergirlInt / n);

		System.out.println("===============");
		System.out.print("Ranking of Total score:");

		int[] array = { literatureInt, angrybirdInt, narutoInt, microblogInt,
				supergirlInt };
		java.util.Arrays.sort(array);
		for (int j = 0; j < array.length; j++)

			System.out.print(" " + array[j]);

		System.out.println("");
		System.out.println("===============");
		System.out.println("variance:");
		System.out.println("literature" + V);
		System.out.println("angrybird" + W);
		System.out.println("naruto" + X);
		System.out.println("microblog" + Y);
		System.out.println("supergirl" + Z);

		System.out.println("===============");
		System.out.println("Ranking of variance:");

		double[] array1 = { V, W, X, Y, Z };
		java.util.Arrays.sort(array1);
		for (int i = 0; i < array1.length; i++)

			System.out.println(" " + array1[i]);

	}

}
